<extend name="Public/base" />

<block name="body">
    <!-- 标题栏 -->
    <div class="main-title">
        <h2>{$meta_title}</h2>
    </div>

    <!-- 数据列表 -->
    <div class="data-table table-striped">
        <table class="">
            <thead >
            <tr>
                <th class="">ID</th>
                <th class="">头像</th>
                <th class="">姓名</th>
                <th class="">性别</th>
                <th class="">手机号</th>
<!--                <th class="">操作</th>-->
            </tr>
            </thead>
            <tbody >
            <notempty name="_list">
                <volist name="_list" id="vo">
                    <tr>
                        <td>{$vo.id} </td>
                        <td><if condition="$vo['avatar']"><img src="{$vo.avatar|doAvatar}" width="100px" height="100px" /><else />暂无头像</if></td>
                        <td>{$vo.username}</td>
                        <td><if condition="$vo['sex'] == 1">男<elseif condition="$vo['sex'] == 2" />女<else />未知</if></td>
                        <td>{$vo.mobile}</td>
<!--                        <td><a href="{:U('upUser',array('id' => $vo['id']))}" class="authorize">编辑</a></td>-->
                    </tr>
                </volist>
                <else/>
                <td colspan="5" class="text-center"> aOh! 暂时还没有内容! </td>
            </notempty>
            </tbody>
        </table>
    </div>
    <div class="page">
        {$_page}
    </div>
</block>

<block name="script">
    <script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>

    <script type="text/javascript">
        //搜索功能
        $("#search").click(function(){
            var url = $(this).attr('url');
            var query  = $('.search-form').find('input').serialize();
            var squery = $('.search-form').find('select').serialize();
            query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
            query = query.replace(/^&/g,'');
            squery=squery.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
            squery=squery.replace(/^&/g,'');
            if( url.indexOf('?')>0 ){
                url += '&' + query+'&'+squery;
            }else{
                url += '?' + query+'&'+squery;
            }
            window.location.href = url;
        });
        //回车搜索
        $(".search-input").keyup(function(e){
            if(e.keyCode === 13){
                $("#search").click();
                return false;
            }
        });
        //导航高亮
        highlight_subnav('{:U("Manage/userList")}');
    </script>
</block>
